package com.framework.main.sys.user.service;

import java.util.List;
import java.util.Map;

import com.framework.main.sys.user.domain.UserVo;
import com.framework.base.service.BaseService;
import com.framework.base.struts.Result;

/**
 * @Copyright @ 2011 All right reserved
 * @version 创建时间：Created on 2011-5-21
 * @author 作者：Create by HYH
 * @Email: 517372264@qq.com
 * @description 用户管理的业务接口
 * 
 * 
 */
public interface UserService extends BaseService {
	/**
	 * 用于处理用户登录
	 * 
	 * @param cfg
	 */
	public Result toLogin(UserVo user) throws Exception;

	/**
	 * 分配权限
	 * 
	 * @param cfg
	 * @return
	 * @throws Exception
	 */
	public Result toDistribute(String pk) throws Exception;

	/**
	 * 保存用户分配权限的操作
	 * 
	 * 
	 * @param cfg
	 * @return
	 * @throws Exception
	 */
	public Result doDistribute(Map<String, Object> map) throws Exception;

	/**
	 * 选择人员
	 * 
	 * @param cfg
	 * @return
	 * @throws Exception
	 */
	public Result toselectUser(String pk, String type) throws Exception;

	/**
	 * 更改用户的状态
	 * 
	 * 
	 * @param cfg
	 * @throws Exception
	 */
	public Map<String, Object> doChangeState(String idf, String value)
			throws Exception;

	/**
	 * 根据用户名判断用是否存在
	 * 
	 * @return
	 * @throws Exception
	 */
	public boolean toIsExistUserByName(String userName) throws Exception;

	/**
	 * 
	 * @Description:功能描述 改样式
	 * 
	 * @author：www.51wuxia.com
	 * @Date 2011-6-29 下午05:31:05
	 */
	public void doUpdateIndexCssLastSub(int i) throws Exception;

	/**
	 * 根据角色ID查询角色中所有的用户
	 * 
	 * @param groupid
	 * @return
	 * @throws Exception
	 * @author：gyd
	 */
	public List<?> toListUserByRole() throws Exception;

	/**
	 * 根据部门ID查询角色中所有的用户
	 * 
	 * @param deptid
	 * @return
	 * @throws Exception
	 * @author：gyd
	 */
	public List<?> toListUserByDept(String deptid) throws Exception;

	/**
	 * @Title: checkPass
	 * @Description: 检查密码是滞正确
	 * 
	 * @param password
	 * @return
	 * @throws Exception
	 */
	public boolean checkPass(String password) throws Exception;

	/**
	 * @Title: updatePass
	 * @Description: 修改密码
	 * @param newPass
	 * @return
	 * @throws Exception
	 */
	public int updatePass(String newPass) throws Exception;

	/**
	 * @Title: getUserByTrueNameOrId
	 * @Description:检索出所有用户除管理员外
	 * @return
	 * @throws Exception
	 */
	public List<UserVo> getUserByTrueNameOrId() throws Exception;
	
	/**
	 * 取得用户所有菜单
	 * @throws Exception
	 */
	public void getMenu() throws Exception;
}
